gtk4.git
15 years agoDon't add padding to a pointer
Matthias Clasen [Sun, 25 Apr 2010 20:45:21 +0000 (16:45 -0400)]
Don't add padding to a pointer

15 years agoFix a regression in RTL flipping
Matthias Clasen [Sun, 25 Apr 2010 20:23:01 +0000 (16:23 -0400)]
Fix a regression in RTL flipping

This was only showing up with pack-end packing in horizontal boxes.
The RTL flipping has to be applied after moving the reference point
to the left edge of the child.

15 years agoFormatting and typo fixes
Matthias Clasen [Sat, 24 Apr 2010 01:52:55 +0000 (21:52 -0400)]
Formatting and typo fixes

15 years agoRenamed testextendedlayout2 --> extendedlayoutexample, also removed testextendedlayou...
Tristan Van Berkom [Wed, 21 Apr 2010 08:11:55 +0000 (04:11 -0400)]
Renamed testextendedlayout2 --> extendedlayoutexample, also removed testextendedlayout and letting it reside for now in native-layout branch.

15 years agoMega commit backing out everything from the native-layout branch that
Tristan Van Berkom [Wed, 21 Apr 2010 07:42:23 +0000 (03:42 -0400)]
Mega commit backing out everything from the native-layout branch that
is not ready for integration

This commit makes the native-layout branch into a reasonable
patch applicable to git master, it pulls out GtkCellRenderer
support, ComboBox support, the Plug/Socket api is also not ready
and is pulled out.

15 years agoAdded documentation, implemented gtk_extended_layout_is_height_for_width() where...
Tristan Van Berkom [Wed, 21 Apr 2010 05:32:55 +0000 (01:32 -0400)]
Added documentation, implemented gtk_extended_layout_is_height_for_width() where needed.

15 years agoImproved legibility of the label parameters test.
Tristan Van Berkom [Wed, 21 Apr 2010 02:02:48 +0000 (22:02 -0400)]
Improved legibility of the label parameters test.

15 years agoAdded test reflecting the usage of GtkLabel parameters.
Tristan Van Berkom [Wed, 21 Apr 2010 00:44:24 +0000 (20:44 -0400)]
Added test reflecting the usage of GtkLabel parameters.

15 years agoUpdated test for api change.
Tristan Van Berkom [Wed, 21 Apr 2010 00:44:11 +0000 (20:44 -0400)]
Updated test for api change.

15 years agoUpdating test for api change.
Tristan Van Berkom [Wed, 21 Apr 2010 00:43:41 +0000 (20:43 -0400)]
Updating test for api change.

15 years agoMake sure not to base the minimum size on "max-width-chars", only the natural size.
Tristan Van Berkom [Wed, 21 Apr 2010 00:30:10 +0000 (20:30 -0400)]
Make sure not to base the minimum size on "max-width-chars", only the natural size.

15 years agoAdded test to demonstrate width-for-height labels.
Tristan Van Berkom [Tue, 20 Apr 2010 22:58:44 +0000 (18:58 -0400)]
Added test to demonstrate width-for-height labels.

15 years agoFixed GtkLabel to wrap correctly and report width-for-height correctly when vertical.
Tristan Van Berkom [Tue, 20 Apr 2010 22:54:50 +0000 (18:54 -0400)]
Fixed GtkLabel to wrap correctly and report width-for-height correctly when vertical.

15 years agoSlightly reduced extended layout cache size, updated authors/copywrite year.
Tristan Van Berkom [Tue, 20 Apr 2010 22:53:54 +0000 (18:53 -0400)]
Slightly reduced extended layout cache size, updated authors/copywrite year.

15 years agoFixed GtkLabel to include GtkMisc padding when calculating height-for-width.
Tristan Van Berkom [Tue, 20 Apr 2010 19:23:13 +0000 (15:23 -0400)]
Fixed GtkLabel to include GtkMisc padding when calculating height-for-width.

15 years agoRestore layout in get_desired_size() after guessing a wrap width
Tristan Van Berkom [Tue, 20 Apr 2010 18:16:13 +0000 (14:16 -0400)]
Restore layout in get_desired_size() after guessing a wrap width

This fixes the label layout in cases where gtk_widget_size_request()
is called on a label without a following size_allocate(), for instance
when a button state changes.

15 years agoVarious updates to follow new gtk_extended_layout_get_desired_size added argument.
Tristan Van Berkom [Tue, 20 Apr 2010 05:30:56 +0000 (01:30 -0400)]
Various updates to follow new gtk_extended_layout_get_desired_size added argument.

15 years agoFixed missing return from get_desired_width/height in GtkViewport (causing testgtk...
Tristan Van Berkom [Tue, 20 Apr 2010 05:27:32 +0000 (01:27 -0400)]
Fixed missing return from get_desired_width/height in GtkViewport (causing testgtk to have a small width).

15 years agoSplit up width and height queries so that they make more sense (extended-layout)
Tristan Van Berkom [Tue, 20 Apr 2010 05:26:58 +0000 (01:26 -0400)]
Split up width and height queries so that they make more sense (extended-layout)

15 years agoAdded request_natural argument to get_desired_size()
Tristan Van Berkom [Tue, 20 Apr 2010 05:24:51 +0000 (01:24 -0400)]
Added request_natural argument to get_desired_size()

Currently get_desired_size() is more of an emulation of
gtk_widget_size_request() for the minimum size as it bases the
contextual request on the minimum preferred size; this argument
lets you do the request with the natural preferred size as well.

15 years agoGtkAlignment now tries to allocate natural size to the child if available and does...
Tristan Van Berkom [Tue, 20 Apr 2010 05:22:31 +0000 (01:22 -0400)]
GtkAlignment now tries to allocate natural size to the child if available and does the height-for-width calculation depending on allocation.

15 years agoFixed acces of child->requisition; call gtk_widget_get_child_requisition instead.
Tristan Van Berkom [Tue, 20 Apr 2010 04:33:20 +0000 (00:33 -0400)]
Fixed acces of child->requisition; call gtk_widget_get_child_requisition instead.

This fixes squished pathbar issue (as access to ->requisition is really
not supported anymore).

15 years agoReduced natural request padding for rotating ellipsizing labels
Tristan Van Berkom [Tue, 20 Apr 2010 01:50:55 +0000 (21:50 -0400)]
Reduced natural request padding for rotating ellipsizing labels

After fixing height requests this works much smoother, although in
some places pango seems to ellipsize a rotated label when given
the width it requested.

15 years agoFixed another caching bug in extended layout
Tristan Van Berkom [Tue, 20 Apr 2010 01:37:44 +0000 (21:37 -0400)]
Fixed another caching bug in extended layout

Was confusing width/height REQUEST_NEEDED flags, this caused
the volumebutton test to not re-request the height properly
when changing orientations.

15 years agoUnconditionally return the height for the minimum width when doing get_desired_height()
Tristan Van Berkom [Tue, 20 Apr 2010 00:43:19 +0000 (20:43 -0400)]
Unconditionally return the height for the minimum width when doing get_desired_height()

This is the correct support for the opposing orientation for widgets
that support height-for-width, in an interface that was realized as
width-for-height, a height-for-width supporting widget should return
the minimum height for the minimum width when the initial
get_desired_height() is run.

15 years agoFixed height-for-width cache
Tristan Van Berkom [Tue, 20 Apr 2010 00:41:23 +0000 (20:41 -0400)]
Fixed height-for-width cache

Fixed the cache to be cleared when flagged with WIDTH/HEIGHT_REQUEST_NEEDED.
This error was causing some widgets to not be sized correctly (the stock and
icon browser in the demo for instance).

15 years agoRemoving old comments in gtkbin.c
Tristan Van Berkom [Tue, 20 Apr 2010 00:40:04 +0000 (20:40 -0400)]
Removing old comments in gtkbin.c

15 years agoFixed computation of sizegroups when no explicit request is set.
Tristan Van Berkom [Mon, 19 Apr 2010 18:46:28 +0000 (14:46 -0400)]
Fixed computation of sizegroups when no explicit request is set.

My previous commit to GtkSizeGroup made sure that when
gtk_widget_set_size_request() is set on a widget, it will be
taken into account when computing the widget's own request,
this commit fixes the case where there is no explicit size
request.

15 years agoFixed testellipsize
Tristan Van Berkom [Mon, 19 Apr 2010 18:04:20 +0000 (14:04 -0400)]
Fixed testellipsize

15 years agoAdded testextendedlayout2.c to tests.
Tristan Van Berkom [Mon, 19 Apr 2010 05:07:20 +0000 (01:07 -0400)]
Added testextendedlayout2.c to tests.

This test is a collection of builder files which demonstrate the
added features of natural sizes and height-for-width geometry; so
far it only contains 3 cases, more to come...

15 years agoFixed GtkSpinner to request 12x12 at init time instead of at expose time.
Tristan Van Berkom [Mon, 19 Apr 2010 00:46:30 +0000 (20:46 -0400)]
Fixed GtkSpinner to request 12x12 at init time instead of at expose time.

This should not change the space taken by the spinner when hidden,
and it should only set the minimum size not the actual size (i.e. code
in place was conditionally setting it if not allocated 12x12, which
doesnt really make sense)... This fixes spinners showing at the correct size
in gtk-demo.

15 years agoFixed _gtk_size_group_bump_requisition() to properly handle values specified by gtk_w...
Tristan Van Berkom [Mon, 19 Apr 2010 00:45:42 +0000 (20:45 -0400)]
Fixed _gtk_size_group_bump_requisition() to properly handle values specified by gtk_widget_set_size_request()

15 years agoAdded GTK_DEBUG_EXTENDED_LAYOUT flag and use that for debuggin in gtkextendedlayout.c
Tristan Van Berkom [Mon, 19 Apr 2010 00:14:13 +0000 (20:14 -0400)]
Added GTK_DEBUG_EXTENDED_LAYOUT flag and use that for debuggin in gtkextendedlayout.c

15 years agoImplemented GtkExtendedLayout on GtkWindow.
Tristan Van Berkom [Mon, 19 Apr 2010 00:13:46 +0000 (20:13 -0400)]
Implemented GtkExtendedLayout on GtkWindow.

15 years agoFixed GtkAssistant to not access ->requisition of children directly.
Tristan Van Berkom [Mon, 19 Apr 2010 00:11:43 +0000 (20:11 -0400)]
Fixed GtkAssistant to not access ->requisition of children directly.

This was causing a 0 height action-area because a GtkBox does not
generally update ->requisition with anything useful
(call gtk_widget_get_child_requisition() here instead).

15 years agoFurther fixed base outputs of GtkLabel desired geometries.
Tristan Van Berkom [Sun, 18 Apr 2010 22:13:56 +0000 (18:13 -0400)]
Further fixed base outputs of GtkLabel desired geometries.

Now (when wrapping), if no "width-chars" was specified for a minimum
width, default to the width guessed by gtk_label_ensure_layout(), small
specified widths will otherwise result in very large height requests.

15 years agoFixed bug in gtk_extended_get_desired_size().
Tristan Van Berkom [Sun, 18 Apr 2010 22:12:30 +0000 (18:12 -0400)]
Fixed bug in gtk_extended_get_desired_size().

gtk_extended_get_desired_size() was mixing up orientations based
on the preference, considering ditching the preference anyway.
Also slightly enhanced debug prints.

15 years agoCompute the collective heights for the width of a horizontal box.
Tristan Van Berkom [Sun, 18 Apr 2010 22:09:40 +0000 (18:09 -0400)]
Compute the collective heights for the width of a horizontal box.

Introduce an algorithm to allocate children some virtual widths based on
their base widths returned by ->get_desired_width(), then return the
collective desired heights for each or thier virtually allocated width.

This will only work in the horizontal orientation.

15 years agoFixed extended layout test to compile without the gtk_label_set_fullsize() api.
Tristan Van Berkom [Sun, 18 Apr 2010 21:56:58 +0000 (17:56 -0400)]
Fixed extended layout test to compile without the gtk_label_set_fullsize() api.

15 years agoRestore functionality where ellipsizing label *minimum* size grows to "max-char-width".
Tristan Van Berkom [Sun, 18 Apr 2010 03:06:24 +0000 (23:06 -0400)]
Restore functionality where ellipsizing label *minimum* size grows to "max-char-width".

15 years agoFixed GtkLabel reported minimum and natural sizes
Tristan Van Berkom [Sun, 18 Apr 2010 02:54:29 +0000 (22:54 -0400)]
Fixed GtkLabel reported minimum and natural sizes

This commit makes GtkLabel use "max-width-chars" to determine the
desired natural width for wrapping labels as well as all around refactoring
the initially reported values in get_desired_width/height. this also
addresses some issues with rotating ellipsizing text.

15 years agoNow gtk_extended_layout_get_desired_size() returns a minimum for minimum in the minim...
Tristan Van Berkom [Sun, 18 Apr 2010 02:52:27 +0000 (22:52 -0400)]
Now gtk_extended_layout_get_desired_size() returns a minimum for minimum in the minimum requisition and a natural for minimum in the natural.

15 years agoMake GtkWindow use the generic smallest size for the requisition again
Tristan Van Berkom [Sun, 18 Apr 2010 02:51:35 +0000 (22:51 -0400)]
Make GtkWindow use the generic smallest size for the requisition again

15 years agoFixed test to call the extended layout api instead of consulting ->requisition
Tristan Van Berkom [Sun, 18 Apr 2010 02:50:12 +0000 (22:50 -0400)]
Fixed test to call the extended layout api instead of consulting ->requisition

15 years agoFixed GtkExtendedLayout interaction with sizegroups plus cleanups
Tristan Van Berkom [Sat, 17 Apr 2010 05:51:10 +0000 (01:51 -0400)]
Fixed GtkExtendedLayout interaction with sizegroups plus cleanups

Fixed GtkExtendedLayout to interact with sizegroups, "size-requsts"
and caching the values all in the same code segment.

Migrated the cache code to be internal to gtkextendedlayout.c

15 years agoDisabling natural sizes of labels.
Tristan Van Berkom [Sat, 17 Apr 2010 05:49:35 +0000 (01:49 -0400)]
Disabling natural sizes of labels.

Since GtkLabel is returning invalid natural sizes for now,
in order to test regressions well with the new width-for-height
api, I've temporarily disabled the natural values.

15 years agoRefactored GtkSizeGroup for GtkExtendedLayout
Tristan Van Berkom [Sat, 17 Apr 2010 05:46:59 +0000 (01:46 -0400)]
Refactored GtkSizeGroup for GtkExtendedLayout

Removed _gtk_size_group_compute_requisition and
_gtk_size_group_get_child_requisition in favor of
_gtk_size_group_bump_requisition() which does an orientation
contextual computation of the size group and returns the
collective value in one pass.

15 years agoAdded _gtk_size_group_bump_requisition()
Tristan Van Berkom [Wed, 14 Apr 2010 22:07:27 +0000 (18:07 -0400)]
Added _gtk_size_group_bump_requisition()

Added a function to update sizegroups in multiple passes, this
way the width and height can be updated in the sizegroups after
querying the extended layout implementor for these.

Implemented this in GtkExtendedLayout, sizegroups should be working reasonably now.

15 years agoMega commit to change ->get_desired_size() for ->get_desired_width/height().
Tristan Van Berkom [Tue, 13 Apr 2010 02:21:46 +0000 (22:21 -0400)]
Mega commit to change ->get_desired_size() for ->get_desired_width/height().

This commit changes gtk_extended_layout_get_desired_size() for
per dimension variants. Furthermore this commit reverts the actions
done in size-groups for now as it needs a different approach.

The natural width/height parameters added to aux_info have been changed
for a per width cache for heights and a per height cache for widths.

gtk-demo is still working, currently sizegroups are not taken
into account as mentioned above - size groups need to be alerted both
when the widths and heights are updated independantly and then that
information needs to repropagate also to other extended layout implementors.

16 years agoConstrain the window to the minimum width for the natural height
Tristan Van Berkom [Sun, 11 Apr 2010 02:48:13 +0000 (22:48 -0400)]
Constrain the window to the minimum width for the natural height

GtkWindow now requests the minimum width for the natural height
of its child, or the opposite; depending on ->get_height_for_width.
Currently its not done for GTK_WINDOW_POPUP windows as the menushells
aren't working right yet.

16 years agoImplemented gtk_extended_layout_is_height_for_width() and added another guess algorithm
Tristan Van Berkom [Sun, 11 Apr 2010 02:39:11 +0000 (22:39 -0400)]
Implemented gtk_extended_layout_is_height_for_width() and added another guess algorithm

This patch adds another commented algorythm to find the collective
minimum and natural height for a said width of a horizontally oriented
box (or the opposite). The algorithm works quite well and can be optimized
a bit more - currently its commented because GtkLabel cannot effectively
do width-for-height calculations (doh).

Further, this patch returns an is_height_for_width() preference depending
on the boxes orientation (vertical boxes are width-for-height).

16 years agoFixed gtkbin.c:parent_extended_layout_iface to be static.
Tristan Van Berkom [Sun, 11 Apr 2010 02:38:47 +0000 (22:38 -0400)]
Fixed gtkbin.c:parent_extended_layout_iface to be static.

16 years agoAdded gtk_extended_layout_is_height_for_width()
Tristan Van Berkom [Sun, 11 Apr 2010 02:32:55 +0000 (22:32 -0400)]
Added gtk_extended_layout_is_height_for_width()

Added an indicator telling whether a widget prefers to be allocated
as height-for-width or width-for-height. Usually this depends on the
orientation of a container or the nature of a content widget like GtkLabel.

This indicator is only used in the seldom case where a parent is allocating
free space to the child and the child can flow in either direction, GtkWindow
and GtkScrolledWindow are users of this api.

16 years agoFixed warnings due to missing GTK_WIDGET (cellview) casting.
Tristan Van Berkom [Sun, 11 Apr 2010 02:31:52 +0000 (22:31 -0400)]
Fixed warnings due to missing GTK_WIDGET (cellview) casting.

16 years agoFixed wrapping labels to show up correctly aligned inside their allocations.
Tristan Van Berkom [Sun, 11 Apr 2010 02:30:42 +0000 (22:30 -0400)]
Fixed wrapping labels to show up correctly aligned inside their allocations.

16 years agoAdding tests ported over from the old branch by Matthias.
Tristan Van Berkom [Sun, 11 Apr 2010 02:03:20 +0000 (22:03 -0400)]
Adding tests ported over from the old branch by Matthias.

16 years agoAdded get_height_for_width/get_width_for_height implementation to GtkBox.
Tristan Van Berkom [Sat, 10 Apr 2010 01:50:33 +0000 (21:50 -0400)]
Added get_height_for_width/get_width_for_height implementation to GtkBox.

In order for natural size information to cascade correctly up through
the ancestry GtkBox needs to report height-for-width and width-for-height,
this patch includes an implementation for both in both orientations, one
of them is commented for now as its much too cpu intensive to actually use.

16 years agoFixing height-for-width wrapping of GtkLabel
Tristan Van Berkom [Sat, 10 Apr 2010 01:47:25 +0000 (21:47 -0400)]
Fixing height-for-width wrapping of GtkLabel

Merged in fixes from the old branch in a patch prepared by Matthias Clasen,
added some fixes of my own to make sure that label wrapping follows allocation
and not requisition at show time (allocate time).

16 years agoReimplemented GtkExtendedLayout on GtkBin
Tristan Van Berkom [Fri, 9 Apr 2010 04:19:42 +0000 (00:19 -0400)]
Reimplemented GtkExtendedLayout on GtkBin

Instead of implementing ->get_desired_size() on GtkBin, which
cant really be done because border widths are in the domain of
the concrete subclasses; here we implement only the get_height_for_width
and get_width_for_height apis - GtkBin subclasses whom might have a
variable border width depending on allocations need to write their
own height-for-width implementations.

16 years agoFixed regression in GtkImage size requests
Tristan Van Berkom [Fri, 9 Apr 2010 02:05:36 +0000 (22:05 -0400)]
Fixed regression in GtkImage size requests

Fixed gtksizegroup.c:do_size_request() to never force an initial requisition
as some widgets expect it to remain unchanged across resizes (GtkImage
with pixbufs/filenames assigned is one of these cases).

16 years agoFixed gtk_box_size_allocate() for homogeneous boxes
Tristan Van Berkom [Fri, 9 Apr 2010 01:45:07 +0000 (21:45 -0400)]
Fixed gtk_box_size_allocate() for homogeneous boxes

gtk_box_size_allocate() was forgetting to fetch the minimum
size for children when allocating in homogeneous mode and then
accessing the uninitialized allocated values in that case, fixed.

16 years agoImplemented GtkExtendedLayout on GtkComboBox.
Tristan Van Berkom [Thu, 8 Apr 2010 22:54:47 +0000 (18:54 -0400)]
Implemented GtkExtendedLayout on GtkComboBox.

With this commit it is possible to use ellipsizing text
in the combobox's cell renderers and have them desire to
expand to natural size when placed in a GtkBox.

16 years agoDeprecated gtk_widget_size_request and gtk_widget_get_child_requisition()
Tristan Van Berkom [Thu, 8 Apr 2010 22:53:23 +0000 (18:53 -0400)]
Deprecated gtk_widget_size_request and gtk_widget_get_child_requisition()

Ever since size groups gtk_widget_size_request() can be used in place
of gtk_widget_get_child_requisition(), deprecating both now in favor
of gtk_extended_layout_get_desired_size().

16 years agoAdded assertions
Tristan Van Berkom [Thu, 8 Apr 2010 22:52:12 +0000 (18:52 -0400)]
Added assertions

Added assersions that gtk_extended_layout_get_height_for_width()
methods return minimum sizes lesser than the natural size.

16 years agoSimplified code in GtkSizeGroup, fixes minimum natural size.
Tristan Van Berkom [Thu, 8 Apr 2010 22:49:34 +0000 (18:49 -0400)]
Simplified code in GtkSizeGroup, fixes minimum natural size.

collapse get_fast_child_requisition && get_fast_natural_size into
a single get_fast_size() function which uses the possibly hard coded
minimum request as a minimum value for the returned desired size
(this fixes cases where widgets unwarily return height-for-width
with minimum size > natural size).

16 years agoAdded gtk_cell_view_get_size_of_row() to gtk.symbols
Tristan Van Berkom [Thu, 8 Apr 2010 22:48:42 +0000 (18:48 -0400)]
Added gtk_cell_view_get_size_of_row() to gtk.symbols

16 years agoGtkCellView refactoring for extended layout
Tristan Van Berkom [Thu, 8 Apr 2010 22:46:19 +0000 (18:46 -0400)]
GtkCellView refactoring for extended layout

Added gtk_cell_view_get_desired_size_of_row() to report full
extended layout information for a said row, this obsoletes
gtk_cell_view_get_size_of_row(). Also make GtkCellView queue
a resize on itself when cell renderers are added/removed.

16 years agoSome extended layout fixes for GtkCellView
Tristan Van Berkom [Wed, 7 Apr 2010 05:27:15 +0000 (01:27 -0400)]
Some extended layout fixes for GtkCellView

Fixed GtkCellView to use the new GtkExtendedCell interface to get
natural size from cells and factored out the old size_request() method.

16 years agoImplement GtkExtendedLayout on GtkButton
Tristan Van Berkom [Wed, 7 Apr 2010 00:48:41 +0000 (20:48 -0400)]
Implement GtkExtendedLayout on GtkButton

GtkButton as a content type of widget needs to forward natural size information
to parent containers in order to be resized naturally.

16 years agoImplement GtkExtendedLayout on Alignment
Tristan Van Berkom [Wed, 7 Apr 2010 00:47:15 +0000 (20:47 -0400)]
Implement GtkExtendedLayout on Alignment

GtkAlignment is already using the height for width api to align
the child in the cases where space is available, but also needed
to implement the extended layout in order to reflect natural sizes
to parent widgets.

16 years agoImplemented GtkExtendedLayout on GtkViewport
Tristan Van Berkom [Tue, 6 Apr 2010 21:15:50 +0000 (17:15 -0400)]
Implemented GtkExtendedLayout on GtkViewport

16 years agoImplement GtkExtendedCell on GtkCellRendererText
Tristan Van Berkom [Tue, 6 Apr 2010 07:05:52 +0000 (03:05 -0400)]
Implement GtkExtendedCell on GtkCellRendererText

16 years agoUse new gtk_tree_view_column_get_desired_size()
Tristan Van Berkom [Tue, 6 Apr 2010 07:05:20 +0000 (03:05 -0400)]
Use new gtk_tree_view_column_get_desired_size()

16 years agoAdded gtk_tree_view_column_get_desired_size() as its a corner case
Tristan Van Berkom [Tue, 6 Apr 2010 07:03:55 +0000 (03:03 -0400)]
Added gtk_tree_view_column_get_desired_size() as its a corner case
that does not fall under the two categories.

16 years agoAdded GtkExtendedCell interface (last commit)
Tristan Van Berkom [Tue, 6 Apr 2010 07:03:03 +0000 (03:03 -0400)]
Added GtkExtendedCell interface (last commit)

16 years agoAdd new GtkExtendedCell interface
Tristan Van Berkom [Tue, 6 Apr 2010 06:59:21 +0000 (02:59 -0400)]
Add new GtkExtendedCell interface

Added a new interface to extend layout information of GtkCellRenderers,
GtkCellRenderer is a prerequisite of GtkExtendedCellIface and provides
a base implementation of ->get_desired_size() with ->get_size().

Note that the api for GtkExtendedCell differs from GtkExtendedLayout
since the cells need to be passed an additional widget to calculate
sizes contextual to the widget/screen (fonts etc).

16 years agoRemove gtk_widget_get_desired_size()
Tristan Van Berkom [Tue, 6 Apr 2010 06:56:20 +0000 (02:56 -0400)]
Remove gtk_widget_get_desired_size()

16 years agoFixed classes to call gtk_extended_layout_get_desired_size_again()
Tristan Van Berkom [Tue, 6 Apr 2010 06:55:07 +0000 (02:55 -0400)]
Fixed classes to call gtk_extended_layout_get_desired_size_again()

The previous patch removes the ambiguous gtk_widget_get_desired_size().

16 years agoCall the ->get_desired_size() method directly on the vtable
Tristan Van Berkom [Tue, 6 Apr 2010 06:53:51 +0000 (02:53 -0400)]
Call the ->get_desired_size() method directly on the vtable

This commit is a mistake, it should have been included with the last
commit.

16 years agoMake GtkWidget a prerequisite of extended layout
Tristan Van Berkom [Tue, 6 Apr 2010 06:47:20 +0000 (02:47 -0400)]
Make GtkWidget a prerequisite of extended layout

As it is not allowed to called gtk_extended_layout_get_desired_size()
on a GtkWidget directly; gtk_widget_get_desired_size() was really an
ambiguous api. This patch removes the added GtkWidget api, calls
the appropriate sizegroup code which in turn envokes the interface
vtable, this patch also accordingly makes GtkWidget a prerequisite
of GtkExtendedLayout (the api doesnt work for cell renderers anyway,
patch comming...).

16 years agoRevert "Implement extended layout for GtkBin"
Tristan Van Berkom [Mon, 5 Apr 2010 22:10:41 +0000 (18:10 -0400)]
Revert "Implement extended layout for GtkBin"

This reverts commit 5e8045b14dde691fef5447b7ca483d95f9132b8a.

Conflicts:

gtk/gtkbin.c

16 years agoFixed 2 bugs in gtk_box_size_allocate()
Tristan Van Berkom [Mon, 5 Apr 2010 22:01:56 +0000 (18:01 -0400)]
Fixed 2 bugs in gtk_box_size_allocate()

This commit fixes the loop to take into consideration the
child->padding that will be allocated to the child while calculating
full available size. Additionally it fixes the initial positioning
of child widgets when packed at the end (a special case because the
x position used starts from the end of the box).

16 years agoFixed do_size_request() to start with a 0 base requisition instead of -1
Tristan Van Berkom [Mon, 5 Apr 2010 21:57:06 +0000 (17:57 -0400)]
Fixed do_size_request() to start with a 0 base requisition instead of -1

16 years agoChanged initial values for requisition from -1 to 0.
Tristan Van Berkom [Sun, 4 Apr 2010 20:38:36 +0000 (16:38 -0400)]
Changed initial values for requisition from -1 to 0.

When doing size-requests and get_natural_size() calls, use 0 as
the base value instead of -1, because size_request code assumes
that widget->requesition is initialized at 0.

16 years agoFixed GtkBox to not call get_desired_size() on a child when no child is present.
Tristan Van Berkom [Sun, 4 Apr 2010 20:37:06 +0000 (16:37 -0400)]
Fixed GtkBox to not call get_desired_size() on a child when no child is present.

16 years agoMaking function private in gtktreeviewcolumn to pass the abi test.
Tristan Van Berkom [Sun, 4 Apr 2010 01:37:42 +0000 (21:37 -0400)]
Making function private in gtktreeviewcolumn to pass the abi test.

16 years agoRefixed merge conflicts for GTK_WIDGET_MAPPED/GTK_WIDGET_VISIBLE
Tristan Van Berkom [Sun, 4 Apr 2010 01:35:18 +0000 (21:35 -0400)]
Refixed merge conflicts for GTK_WIDGET_MAPPED/GTK_WIDGET_VISIBLE

16 years agoFixed internal native layout algorythm wrt size-request singals/implementations.
Tristan Van Berkom [Sun, 4 Apr 2010 00:43:39 +0000 (20:43 -0400)]
Fixed internal native layout algorythm wrt size-request singals/implementations.

Because "size-request" signal can be handled by signal connections as well
as by third party derived classes it is necessary to always fire the
"size-request" signal for every recalculation of the widget requisition,
now gtksizegroup.c:do_size_request() fires the signal first and allows it
to overflow the minimum/natural sizes returned by extended layout
implementations.

GtkWidget->get_natural_size() is now left assigning default -1 values to
ensure they both get overridden by the size-request handling.

16 years agoFixed extended layout implementors to not call ->get_desired_size() directly
Tristan Van Berkom [Sun, 4 Apr 2010 00:40:50 +0000 (20:40 -0400)]
Fixed extended layout implementors to not call ->get_desired_size() directly

Getting the desired size of a GtkWidget must always be done with
gtk_widget_get_desired_size() and never with
gtk_extended_layout_get_desired_size() directly as the former passes
through size group logic and updates the widget->requisition cache.

16 years agoRemoved casing of GTK_IS_EXTENDED_LAYOUT() from GtkViewport.
Tristan Van Berkom [Sun, 4 Apr 2010 00:36:13 +0000 (20:36 -0400)]
Removed casing of GTK_IS_EXTENDED_LAYOUT() from GtkViewport.

16 years agoFixed invalid pointer access in gtk_tree_view_column_get_desired_size()
Tristan Van Berkom [Sun, 4 Apr 2010 00:34:43 +0000 (20:34 -0400)]
Fixed invalid pointer access in gtk_tree_view_column_get_desired_size()

16 years agoPartially fixed GtkTreeview for extended layout
Tristan Van Berkom [Sun, 4 Apr 2010 00:30:14 +0000 (20:30 -0400)]
Partially fixed GtkTreeview for extended layout

Removed the size_request() handling on the class and calculate
minimum size from get_desired_size(); base the natural width on
either the minimum of column headers, or a greater natural request
of the columns renderers.

16 years agoApplied Jan Arne Petersen's patch for GtkScrolledWindow
Tristan Van Berkom [Sun, 4 Apr 2010 00:09:18 +0000 (20:09 -0400)]
Applied Jan Arne Petersen's patch for GtkScrolledWindow

Applied patch to add height-for-width/width-for-height suppot
to GtkScrolledWindow plus modifications to use gtk_widget_get_desired_size()
to query children sized instead of directly calling the layout api, plus
removed the ->size_request() implementation interfering with the mess.

16 years agoFixed GtkCellRendererText invalid pointer access.
Tristan Van Berkom [Sat, 3 Apr 2010 23:48:14 +0000 (19:48 -0400)]
Fixed GtkCellRendererText invalid pointer access.

Fixed get_desired_size() to not access parameters when NULL and
also not to access priv->object if it hasnt yet been assigned.

16 years agoTake extended layout into account in viewport
Jan Arne Petersen [Thu, 1 Apr 2010 09:53:41 +0000 (11:53 +0200)]
Take extended layout into account in viewport

Make sure the right height is used in GtkViewPort.

16 years agoDon't use gio-unix on win32
Matthias Clasen [Thu, 1 Apr 2010 14:07:11 +0000 (10:07 -0400)]
Don't use gio-unix on win32

We only need gio-unix when building the x11 backend.
Reported by Yevgen Muntyan in bug 614540.

16 years agoUpdated Basque language
Inaki Larranaga Murgoitio [Wed, 31 Mar 2010 10:22:17 +0000 (12:22 +0200)]
Updated Basque language

16 years agoUpdated Basque language
Inaki Larranaga Murgoitio [Sat, 27 Mar 2010 12:47:55 +0000 (13:47 +0100)]
Updated Basque language

16 years agoUpdated Basque language
Inaki Larranaga Murgoitio [Sat, 27 Mar 2010 12:27:40 +0000 (13:27 +0100)]
Updated Basque language

16 years agoUpdated Danish translation
Kenneth Nielsen [Tue, 30 Mar 2010 22:21:05 +0000 (00:21 +0200)]
Updated Danish translation